{include file='header.tpl'}
{include file='admin/leftcol.tpl'}
<div id="left-area">
<div class="entry post clearfix width-for-all-img">
              <div class="breadcrumb">
            <span class="raquo"></span><a href="/">Главная</a>
           <span class="raquo"> &raquo; </span><a href="{geturl controller="admin" action="index"}">Админ панель</a>  
           <span class="raquo"> &raquo; </span><a href="{geturl controller='admin' action='users'}">Пользователи</a>  
    </div>
    <h1 class="category-title">Редактирование пользователя</h1> 
<div class="form">
<form method="post" action="{geturl route='admineditusers' id=$fp->id}" id="editprofile-form">


        <div class="error"{if !$fp->hasError()} style="display: none"{/if}>
            Одно или несколько полей заполнены неверно. Проверьте, пожалуйста, 
            поля с ошибками и отправьте форму ещё раз.
        </div>

        <div class="row" id="form_username_container">
              <label for="form_username">Логин:</label>
             <input type="text" id="form_username"
                   name="login" value="{$fp->login|escape}" />
            {include file='lib/error.tpl' error=$fp->getError('login')}
        </div>
        
        <div class="row" id="form_password_container">
              <label for="form_password">Пароль:</label>
             <input type="password" id="form_password"
                   name="password" value="{$fp->password|escape}" />
            {include file='lib/error.tpl' error=$fp->getError('password')}
        </div>
        
         <div class="row" id="form_password_container">
             <label for="form_password_again">Потверждение пароля:</label>
             <input type="password" id="form_password_again"
                   name="password_again" value="{$fp->password_again|escape}" />
            {include file='lib/error.tpl' error=$fp->getError('password_again')}
        </div>

        
         <div class="row" id="form_region_container">
               <label for="form_country_id">Страна:</label>
        
            <select name="country_id" id="country_id" class="chosen-select">
				<option value="0">- выберите страну -</option>
                               {foreach from=$countrylist item=item}
                                {if $fp->country_id == $item.country_id}
				<option value="{$item.country_id}" selected="selected">{$item.country_name}</option>
                                {else}
                                <option value="{$item.country_id}">{$item.country_name}</option>
                                {/if}
                                {/foreach}
				
	</select>
            {include file='lib/error.tpl' error=$fp->getError('country_id')}
        </div>
        
         <div class="row" id="form_region_container">
             <label for="form_region_id">Регион:</label></span>
         
           <select name="region_id" id="region_id"  class="chosen-select">
				<option value="0">- выберите регион -</option>
                                 {foreach from=$regionlist item=item}
                                {if $fp->region_id == $item.region_id}
				<option value="{$item.region_id}" selected="selected">{$item.region_name}</option>
                                {else}
                                <option value="{$item.region_id}">{$item.region_name}</option>
                                {/if}
                                {/foreach}
			</select>
            {include file='lib/error.tpl' error=$fp->getError('region_id')}
        </div>
        
         <div class="row" id="form_region_container">
              <label for="form_city_id">Город:</label>
          
           <select name="city_id" id="city_id" class="chosen-select">
				<option value="0">- выберите город -</option>
                                 {foreach from=$citylist item=item}
                                {if $fp->city_id == $item.city_id}
				<option value="{$item.city_id}" selected="selected">{$item.city_name}</option>
                                {else}
                                <option value="{$item.city_id}">{$item.city_name}</option>
                                {/if}
                                {/foreach}
			</select>
            {include file='lib/error.tpl' error=$fp->getError('city_id')}
        </div>
      
                
        <div class="row" id="form_adress_container">
            <label for="form_first_name">Имя и фамилия, либо название магазина:</label>
          
                <input type="text" id="form_first_name" name="first_name" value="{$fp->first_name|escape}" />
            {include file='lib/error.tpl' error=$fp->getError('first_name')}
        </div>
         
         <div class="row" id="form_phone_container">
             <label for="form_phone">Телефон:</label></span>
          <input type="text" id="form_phone" name="phone" value="{$fp->phone|escape}" />
            {include file='lib/error.tpl' error=$fp->getError('phone')}
        </div>
        
        <div class="row" id="form_custom_phones_container">
              <span class="td4" style="width:200px;padding-top: 5px;">  <label for="form_custom_phones">Дополнительные телефоны (<b>Укажите дополнительные телефоны для связи с вами</b>):</label></span>
            <span class="td4" style="padding: 5px;"> 
                  <input type="text" id="form_custom_phones" name="custom_phones" value="{$fp->custom_phones|escape}" />
             
                Перечислите телефоны через запятую или Enter
            {include file='lib/error.tpl' error=$fp->getError('custom_phones')}</span>
        </div>
        
        <div class="row" id="form_email_container">
            <label for="form_email">E-mail:</label>
            <input type="text" id="form_email"
                   name="email" value="{$fp->email|escape}" />
            {include file='lib/error.tpl' error=$fp->getError('email')}
        </div>
        
            <div class="qq-upload-button" id="upload" style="position: relative; overflow: hidden; direction: ltr;">Загрузить изображения
            <input type="file" name="file" style="position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0;">
        </div>
          <span id="status" ></span>
        
                <ul id="files" class="qq-upload-list">

               </ul>
        
        <div class="row" id="form_email_container">
              <label for="form_content">о себе:</label>
         
               <textarea id="form_content" name="content">{$fp->content}</textarea>
            {include file='lib/error.tpl' error=$fp->getError('content')}
        </div>
        
       
        <div class="submit">
            <input type="submit" class="button green-pink" value="Изменить" />
        </div>

</form>
</div>
          </span> 

            
     
      </div>
     </div>

{include file="footer.tpl"}